//Thu Jun 17 15:33:17 CDT 2010
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>

using namespace std;

const int xx[] =
{ 1, 0, -1, 0 };
const int yy[] =
{ 0, 1, 0, -1 };

class SequenceOfCommands
{
public:
	string whatHappens(vector<string> commands)
	{
		int x = 0;
		int y = 0;
		int idx1 = 0;
		string str = "";
		int cnt = 0;
		for (int i = 0; i < commands.size(); i++)
			str += commands[i];
		str += str + str + str;
		for (int i = 0; i < str.size(); i++)
		{
			if (str[i] == 'S')
			{
				x += xx[idx1];
				y += yy[idx1];
			}
			else if (str[i] == 'L')
			{
				idx1 = (idx1 + 1) % 4;
			}
			else if (str[i] == 'R')
			{
				idx1 = (idx1 + 3) % 4;
			}
		}
		if (x == 0 && y == 0)
			return "bounded";
		return "unbounded";
	}
};
